package com.ims.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 百望相关配置
 *
 * @author IMS
 */
@Component
@ConfigurationProperties(prefix = "baiwang")
@PropertySource(value = { "classpath:baiwang.yml" })
public class BaiWangConfig
{
    /** AppID */
    public static String appId;

    /** AppKey */
    public static String appKey;

    /** AppSecret */
    public static String appSecret;

    /** salt */
    public static String salt;

    /** 服务url */
    public static String url;

    /** 用户名 */
    public static String userName;

    /** 密码 */
    public static String password;


    public static String getAppId()
    {
        return appId;
    }

    @Value("${appId}")
    public void setAppId(String appId)
    {
        BaiWangConfig.appId = appId;
    }

    public static String getAppKey()
    {
        return appKey;
    }

    @Value("${appKey}")
    public void setAppKey(String appKey)
    {
        BaiWangConfig.appKey = appKey;
    }

    public static String getAppSecret()
    {
        return appSecret;
    }

    @Value("${appSecret}")
    public void setAppSecret(String appSecret)
    {
        BaiWangConfig.appSecret = appSecret;
    }

    public static String getSalt()
    {
        return salt;
    }

    @Value("${salt}")
    public void setSalt(String salt)
    {
        BaiWangConfig.url = salt;
    }

    public static String getUrl()
    {
        return url;
    }

    @Value("${url}")
    public void setUrl(String url)
    {
        BaiWangConfig.url = url;
    }

    public static String getUserName()
    {
        return userName;
    }

    @Value("${userName}")
    public void setUserName(String userName)
    {
        BaiWangConfig.userName = userName;
    }

    public static String getPassword()
    {
        return password;
    }

    @Value("${password}")
    public void setPassword(String password)
    {
        BaiWangConfig.password = password;
    }
}
